home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network PC
/
Network PC.iso
/
windows 95 utilities
/
games
/
gaming utilities
/
wadauthor
/
default.acs
< prev
next >
Wrap
Text File
|
1996-07-25
|
3KB
|
95 lines
// When WadAuthor finds no script code, it reads this
// default script code from the DEFAULT.ACS file in
// the WadAuthor directory. For information about
// programming scripts, please refer to the official
// Hexen specifications.
#include "common.acs"
// This script supplies the glass-shattering effect
// used throughout Hexen. To use it, perform the
// following steps.
// 1) Create a sector on the map adjacent to another
// sector but with a higher floor. Make sure the
// linedef below textures look like stained glass,
// and make sure the main textures look like
// broken glass.
//
// 2) Create four map spots just in front of the sector.
// Give two one tag number, and give the others another
// tag number. Make their height halfway between
// floor and ceiling.
//
// 3) Set the stained-glass linedef type to ACS_Execute
// this script, passing it the tag of the sector you
// created in step one along with the tag numbers of
// the things you created. Make sure the activation
// code is set to trigger when hit by a projectile.
script 1 ( int iSector, int iThingTag1, int iThingTag2 )
{
int i; // local loop control variable
// Lower the sector's floor; this exposes a
// different texture to the player, making it
// appear the glass has shattered. Play the
// shattering sound at the thing locations
// given by the first tag.
Floor_LowerInstant( iSector, 0, 16 );
Thingsound( iThingTag1, "GlassShatter", 127 );
delay(const: 1);
// Create twenty shards of glass at the thing
// locations given by the thing tags, heading in
// different directions at different rates.
i = 10;
while ( i-- > 0 )
{
Thing_ProjectileGravity( iThingTag1,
random( T_STAINEDGLASS1, T_STAINEDGLASS0 ),
random( 0, 255 ), random( 10, 40 ),
random( 5,20 ) );
Thing_ProjectileGravity( iThingTag2,
random( T_STAINEDGLASS1, T_STAINEDGLASS0 ),
random( 0, 255 ), random( 10, 40 ),
random( 5,20 ) );
}
}
// The following scripts are placeholders to allow Korax to function
// correctly. If your wadmap uses Korax, you may wish to customize
// the following.
script 249 ( void )
{
print(s:"KORAX RAN SCRIPT 249" );
}
script 250 ( void )
{
print(s:"KORAX RAN SCRIPT 250" );
}
script 251 ( void )
{
print(s:"KORAX RAN SCRIPT 251" );
}
script 252 ( void )
{
print(s:"KORAX RAN SCRIPT 252" );
}
script 253 ( void )
{
print(s:"KORAX RAN SCRIPT 253" );
}
script 254 ( void )
{
print(s:"KORAX RAN SCRIPT 254" );
}
script 255 ( void )
{
print(s:"KORAX RAN SCRIPT 255" );
}